package com.mtnz.njk.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
* @Description:    商城积分实体类
* @Author:         ZPX
* @CreateDate:     2019\7\9 16:50
* @Version:        1.0
*/
@Data
@Table(name = "integral_shop")
public class IntegralEntity {

    //序号
    @Id
    @Column(name = "integral_id")
    private Integer integralId;

   //商品名称
   @Column(name = "integral_name")
   private String  integralName;

   //商品图
   @Column(name = "integral_img")
   private String  integralImg;

   //兑换积分
   @Column(name = "integral_sco")
   private Integer  integralSco;

   //是否上架
   @Column(name = "status_shelves")
   private String  statusShelves;

   //标题图设置
   private String  status;

   //创建时间
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @Column(name = "create_date")
   private Date    createDate;

   //更新时间
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @Column(name = "update_date")
   private Date    updateDate;

   //库存
   @Column(name = "repository_num")
   private Integer  repositoryNum;

   //描述
   @Column(name = "integral_describe")
   private String  integralDescribe;

   //背景图
   @Column(name = "background_img")
   private String  backgroundImg;

   //积分类型
   @Column(name = "integral_type")
   private Integer integralType;

   //分享时间
   @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
   @Column(name = "share_time")
   private Date shareTime;
   //分享数
   @Column(name = "share_views")
   private Integer shareViews;

   //积分索引
   @OrderBy
   @Column(name = "sort")
   private Integer sort;

   @Column(name = "limit_status")
   private Integer limitStatus;

   @Transient
   private String url;


}
